<?php

use App\Http\Controllers\FieldEncryptController;
use App\Http\Controllers\GiteePullerController;
use App\Http\Controllers\IndexController;
use App\Http\Controllers\Live\ShopController;
use App\Http\Controllers\Review\ActivityController;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return Inertia::render('Welcome', [
        'canLogin' => Route::has('login'),
        'canRegister' => Route::has('register'),
        'laravelVersion' => Application::VERSION,
        'phpVersion' => PHP_VERSION,
    ]);
});
Route::match(['get','post'], '/register',IndexController::class.'@register')->name('register');
Route::match(['get','post'], '/login',IndexController::class.'@login')->name('login');
Route::match(['get','post'], '/testmongo',IndexController::class.'@testMongo')->name('testmongo');
Route::match(['get','post'], '/testmongo1',IndexController::class.'@testMongo1')->name('testmongo1');
Route::match(['get','post'], '/testfirefox',IndexController::class.'@testFireFox')->name('testfirefox1');
Route::match(['get','post'], '/pull',GiteePullerController::class.'@pull')->name('giteepull');
Route::match(['get','post'], '/pulltest',GiteePullerController::class.'@pullTest')->name('giteepulltest');
Route::match(['get','post'], '/testalioss',IndexController::class.'@testAliOss')->name('testalioss');
Route::match(['get','post'], '/testencinsert',FieldEncryptController::class.'@testEncInsert')->name('testencinsert');
Route::match(['get','post'], '/testencupdate',FieldEncryptController::class.'@testEncUpdate')->name('testencupdate');
Route::match(['get','post'], '/testencselect',FieldEncryptController::class.'@testEncSelect')->name('testencselect');
Route::match(['get','post'], '/testencselect',FieldEncryptController::class.'@testEncSelect')->name('testencselect');
Route::match(['get','post'], '/shop/live/api_points_charge_logs',ShopController::class.'@chargePointsLogList');
Route::match(['get','post'], '/shop/live/api_points_send_logs',ShopController::class.'@sendPointsLogList');
Route::match(['get','post'], '/shop/live/api_points_balance_query',ShopController::class.'@shopPointsBalance');
Route::match(['get','post'], '/shop/live/pointreceiverlist',ShopController::class.'@pointReceiverList');
Route::match(['get','post'], '/shop/live/pointreceiversize',ShopController::class.'@pointReceiverSize');
Route::match(['get','post'], '/shop/live/refreshrooms',ShopController::class.'@refreshRoomList');
Route::get('/dashboard', function () {
    return Inertia::render('Dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
Route::prefix("/review/activity")->group(function(){
 Route::post('new',[ActivityController::class,'actCreate']);
 Route::post('delete',[ActivityController::class,'actDelete']);
 Route::post('edit',[ActivityController::class,'actEdit']);
 Route::post('query',[ActivityController::class,'actQuery']);
 Route::post('flow',[ActivityController::class,'actFlow']);
 Route::post('uploadfiles',[ActivityController::class,'actUploadFile']);
 Route::post('newform',[ActivityController::class,'actCreateForm']);
 Route::post('submitform',[ActivityController::class,'actSubmitForm']);
 Route::post('reviewform',[ActivityController::class,'actReviewForm']);
 Route::post('analysisform',[ActivityController::class,'actAnalysisForm']);
 Route::get('make',[ActivityController::class,'actMake']);
 Route::post('doit',[ActivityController::class,'actDoit']);
});
